/**
 * @class Ext.app.ErrorWindow
 * @extends Ext.panel.Window
 */
Ext.define('Ext.app.ErrorWindow', {
    extend: 'Ext.window.Window',
    alias: 'widget.errorWindow',

    id: 'errorWindow',
    height: 500,
    width: 800,
    bodyPadding: 5,
    layout: {
        type: 'vbox',
        align: 'stretch'
    },
    items: [
        {
            xtype: 'textarea',
            hideLabel: true,
            readOnly: true,
            style: 'margin:0',
            fieldStyle: 'color:#FF0000',
            flex: 1
        }
    ],
    
    listeners: {
        beforeclose: function () {
            Ext.getBody().unmask();
        }
    },
    
    initComponent : function() {
        Ext.getBody().mask();
        this.callParent();
    },
    
    setMsg: function(msg) {
        this.down('textarea').setValue(msg);
    }
});
